<template>
    <div>
        <div class="header">
            <div class="top" @click="goMain">返回疫情地图</div>
            <img src="../../assets/images/top2.png" alt="">   
            <div class="timeShow">截至北京时间 {{covDesc.modifyTime}}</div> 
        </div> 
        
        <div class="content"></div>
        <div class="frame"> 
            <!-- 高风险地区 -->
            <AreaShow setColor="#f74c31" :areaList="riskArea.high" label="高风险地区"/>

            <!-- 中风险地区 -->
            <AreaShow setColor="#fbb046" :areaList="riskArea.mid" label="中风险地区"/>
        </div>
    </div>
</template>

<script>
    import infoPoint from '../../hooks/infoPoint'
    import routerJump from '../../hooks/routerJump'
    import AreaShow from '../../components/common/AreaShow.vue'

    export default {
        name: 'AllAreaRisk',
        components:{AreaShow},
        setup() {
            const covDesc = infoPoint()
            const riskArea = covDesc.riskarea
            const {goMain} = routerJump()

            return {
                covDesc,
                riskArea,
                goMain,
            }
        }
    }
</script>

<style lang="less" scoped>
    .header {
        img {
            width: 100%;
            vertical-align: bottom;
        }
        .timeShow {
            font-size: 0.3rem;
            color: rgba(255, 255, 255, 0.705);
            text-align: center;
            margin-top: -0.55rem;
        }
        .top {
            position: absolute;
            top: 0.3rem;
            margin-left: 0.3rem;
            padding: 0 0.15rem;
            height: 0.4rem;
            background-color: rgba(0, 0, 0, .3);
            border-radius: 0.5rem;
            line-height: 0.4rem;
            font-size: 0.2rem;
            letter-spacing: 0.03rem;
            color: #fff;
        }
    }
    .content {
        margin-top: -0.1rem;
        height: 0.3rem;
        background-color: rgb(201, 214, 248);
    }
    .frame {
        margin-top: -0.1rem;
        padding: 0.2rem;
        border: 0.2rem solid rgb(201, 214, 248);
    }
</style>